package com.ly.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component //把本配置放入到springboot容器中，使其被扫描到
@ConfigurationProperties(prefix = "user")
@PropertySource(value="classpath:MyConfig.properties",encoding = "utf-8")
public class MyConfig {

    private String username ;

    private int age ;

    private String userSex ;

    private String love ;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public String getLove() {
        return love;
    }

    public void setLove(String love) {
        this.love = love;
    }
}
